package com.azier.kapacitor.script.node;

import com.azier.kapacitor.script.arg.LambdaArg;
import com.azier.kapacitor.script.method.Quiet;
import com.azier.kapacitor.script.node.nodebind.CommonNodeBind;

import java.util.ArrayList;

/**
* 1 * @Author: luoj
* 2 * @Date: 2019/11/8 11:27
* 3
*/

/**
Combine this node with itself. The data is combined on timestamp.
**/

/**
将此节点与其自身结合。数据按时间戳合并。
**/
public class WhereNode extends AbstractNode implements CommonNodeBind {
    private static final String name = "where";

    public WhereNode(String expression) {
        super(new ArrayList<>(),new ArrayList<>(),name);
        //
        this.args.add(new LambdaArg(expression));

    }

    /**
    Suppress all error logging events from this node.
    **/
    /**
    禁止来自此节点的所有错误记录事件。
    **/
    public WhereNode quiet(){
        Quiet quiet = new Quiet();
        super.addMethod(quiet);
        return this;
    }
}